package com.cxl.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;

import java.io.Serializable;

/**
 * <p>
 *
 * </p>
 *
 * @author 崔学磊
 * @since 2022-03-16
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("t_fires")
@Document(indexName = "fires_doc")
public class Fires implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @Id
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 消防名称
     */
    private String name;

    /**
     * 省
     */
    private Integer pid;

    /**
     * 市
     */
    private Integer cid;

    /**
     * 县
     */
    private Integer xid;

    /**
     * 出水口外键
     */
    private Integer oid;

    /**
     * 类型外键
     */
    private Integer tid;

    /**
     * 联网单位外键
     */
    private Integer uid;

    /**
     * 水管道
     */
    private String pipes;

    /**
     * 描述
     */
    private String depict;

    //冗余字段
    @TableField(exist = false)
    private Integer pageNum = 1;

    @TableField(exist = false)
    private Integer pageSize = 3;

    @TableField(exist = false)
    private String pname;

    @TableField(exist = false)
    private String cname;

    @TableField(exist = false)
    private String xname;

    @TableField(exist = false)
    private String tname;

    @TableField(exist = false)
    private String oname;

    @TableField(exist = false)
    private String uname;
}
